{% extends 'base.html' %}

{% block title %}ETH Vote | Login{% endblock %}
{% block header %}ETH Vote | User Login{% endblock %}

{% block content %}

    <div class="container">
        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                <div class="login-panel panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">Please Sign In</h3>
                    </div>
                    <div class="panel-body">
                        <form method="post" > {% csrf_token %}
                            <p class="bs-component">
                                <table>
                                    {{ form.as_table }}
                                </table>
                            </p>
                            <p class="bs-component">
                                <center>
                                    <input class="btn btn-success btn-sm" type="submit" value="login" />
                                </center>
                            </p>
                            <input type="hidden" name="next" value="{{ next }}" />
			    <center>
				<br>
				<p>
					Maybe your looking for <a href="http://register.ethvote.online" target="_blank">register.ethvote.online</a>?
				</p>
			    </center>
                        </form>
                    </div>

		    <div class="panel-body">
			    <center>
				    This site is a demo for an Ethereum voting protocol (<a href="https://github.com/Mattie432/Blockchain-Voting-System/blob/master/Paper/Dissertation/Dissertation.pdf">proposal here</a>). This demo uses the Ethereum testnet (<a href="https://ropsten.etherscan.io/">current status</a>) for transaction processing.
			    </center>
		    </div>

                </div>
            </div>
        </div>
    </div>

{% endblock %}

{% block javascript %}

<script>
{% if not user.is_authenticated %}
$("ul.nav.navbar-nav.navbar-right").css("display","none");
{% endif %}
</script>

{% endblock %}
